<template>
	<view class="P">
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onShow() {
			console.log('进入了假的启动页');
			// 延迟3秒执行跳转逻辑
			setTimeout(() => {
				const isShowLangPopUp = uni.getStorageSync("isShowlangPopUp");
				const userId = uni.getStorageSync("userId");

				if (!isShowLangPopUp) {
					console.log('未设置过系统语言，进入语言选择页面');
					uni.navigateTo({
						url: '/pages/setlang/setlang',
						animationType: 'slide-in-right',
						animationDuration: 200
					});
				} else {
					if (userId) {
						console.log('已登录，跳转到 demo2');
						uni.switchTab({
							url: '/pages/demo2/demo2'
						});
					} else {
						console.log('未登录，跳转到 demo1');
						uni.navigateTo({
							url: '/pages/demo1/demo1',
							animationType: 'slide-in-right',
							animationDuration: 200
						});
					}
				}
			}, 1000); 
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.P {
		width: 100vw;
		height: 100vh;
		background-image: url('../../static/startpage.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}
</style>